#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void find_single(int* arr, int len, int* p1, int* p2)
{
	int ret = 0;
	int i = 0;
	for (i = 0; i < len; i++)
	{
		ret ^= arr[i];
	}
	int pon = 0;
	for (i = 0; i < 32; i++)
	{
		if ((ret >> i) & 1)
		{
			pon = i;
			break;
		}
	}
	for (i = 0; i < len; i++)
	{
		if ((arr[i] >> pon) & 1)
		{
			*p1 ^= arr[i];
		}
		else
		{
			*p2 ^= arr[i];
		}
	}
}
int main()
{
	int arr[] = { 1,2,3,4,5,1,2,3,4,6 };
	int len = sizeof(arr) / sizeof(arr[0]);
	int num1 = 0;
	int num2 = 0;
	find_single(arr, len, &num1, &num2);
	printf("%d %d\n", num1, num2);
	return 0;
}